package com.atXiao.food.chain;

/**
 * 权限校验器
 * @author: lixiaoxiao
 * @date: 2024/1/12 14:10
 * @version: 1.0
 * @desc:
 */
public class AuthHandler extends Handler{


    @Override
    public void doHandler(User user) {
        String role = user.getRole();
        if (!"admin".equals(role)){
            System.out.println("当前权限过低");
            return;
        }

        System.out.println("通过权限校验~~~~~~~~~~");
    }
}
